import 'dart:convert';

SchoolActivities schoolActivitiesFromJson(String str) =>
    SchoolActivities.fromJson(json.decode(str));

String schoolActivitiesToJson(SchoolActivities data) =>
    json.encode(data.toJson());

class SchoolActivities {
  SchoolActivities({
    this.status,
    this.message,
    this.result,
  });

  int? status;
  String? message;
  Result? result;

  factory SchoolActivities.fromJson(Map<String, dynamic> json) =>
      SchoolActivities(
        status: json["status"],
        message: json["message"],
        result: Result.fromJson(json["result"]),
      );

  Map<String, dynamic> toJson() => {
        "status": status,
        "message": message,
        "result": result?.toJson(),
      };
}

class Result {
  Result({
    this.subResult,
  });

  List<SubResult>? subResult;

  factory Result.fromJson(Map<String, dynamic> json) => Result(
        subResult: List<SubResult>.from(
            json["subResult"].map((x) => SubResult.fromJson(x))),
      );

  Map<String, dynamic> toJson() => {
        "subResult": List<dynamic>.from(subResult!.map((x) => x.toJson())),
      };
}

class SubResult {
  SubResult({
    this.firstName,
    this.lastName,
    this.classId,
    this.startDateUTC,
    this.name,
    this.workType,
    this.className,
    this.id,
  });

  String? firstName;
  String? lastName;
  String? classId;
  int? startDateUTC;
  String? name;
  String? workType;
  String? className;
  String? id;

  factory SubResult.fromJson(Map<String, dynamic> json) => SubResult(
        firstName: json["firstName"],
        lastName: json["lastName"],
        classId: json["classId"],
        startDateUTC: json["startDateUTC"],
        name: json["name"],
        workType: json["workType"],
        className: json["className"],
        id: json["id"],
      );

  Map<String, dynamic> toJson() => {
        "firstName": firstName,
        "lastName": lastName,
        "classId": classId,
        "startDateUTC": startDateUTC,
        "name": name,
        "workType": workType,
        "className": className,
        "id": id,
      };
}
